import request from '@/utils/request'
//1、查询所有品牌数据
export const GetAllBrands = () => {
  return request({
    url: `/admin/product/brand/list`,
    method: 'GET',
  })
}
// 2、查询品牌分页数据
export const GetBrands = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/brand/list/${pageNum}/${pageSize}`,
    method: 'GET',
  })
}
// 3、id查询用户
export const GetBrandById = id => {
  return request({
    url: `/admin/product/brand/getById/${id}`,
    method: 'GET',
  })
}
// 4、更新用户
export const UpdateBrand = brand => {
  return request({
    url: `/admin/product/brand/update`,
    method: 'PUT',
    data: brand,
  })
}
// 5、根据id删除用户
export const DeleteBrand = id => {
  return request({
    url: `/admin/product/brand/delete/${id}`,
    method: 'DELETE',
  })
}
// 6、新增用户
export const SaveBrand = brand => {
  return request({
    url: `/admin/product/brand/save`,
    method: 'POST',
    data: brand,
  })
}
